package com.events.testservice.rest.v1;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import com.events.testservice.rest.v1.dto.SalesOrderDto;

/**
 * Resource endpoint to handle sales Order object requests.
 * @author Ashish Sonawane
 *
 */
@Path("/v1/SalesOrder")
public interface SalesOrderResource {

    @GET
    @Path("/{id}")
    @Produces({ MediaType.APPLICATION_JSON })
    public Response getSalesOrder(@PathParam("id") Long id);
    
    @POST
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    public Response createSalesOrder(SalesOrderDto sampleDto);
    
    @GET
    @Path("/delete/{id}")
    @Produces({ MediaType.APPLICATION_JSON })
    public Response deleteSalesOrder(@PathParam("id") Long id);
    
    @POST
    @Path("/{id}/{orderName}")
    @Produces(MediaType.APPLICATION_JSON)
    @Consumes(MediaType.APPLICATION_JSON)
    public Response updateSalesOrder(@PathParam("id") Long id, @PathParam("orderName") String orderName);
    
}

